package com.leon.spring.day01.demo3;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

/**
 * Created by Administrator on 2017/4/15.
 */
public class TestBean {
    public static void main(String[] arg) {
        ApplicationContext ac =
                new FileSystemXmlApplicationContext("E:\\javaProj\\code\\spring01\\src\\com\\leon\\spring\\day01\\applicationContext.xml");
        Calendar c1 = ac.getBean("c1", Calendar.class);
        System.out.println(c1);
        Calendar c2 = ac.getBean("c2", Calendar.class);
        System.out.println(c2);
        Date time = ac.getBean("time", Date.class);
        System.out.println(time);


    }
}
